package com.hsnn.medstgmini.subscribe.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.springframework.format.annotation.DateTimeFormat;

import com.hsnn.medstgmini.util.FormatDate;

/**
 * @category 预约详情日志实体类
 * @author 韩守松
 * @date 2015年8月28日
 */
@Entity
@Table(name="bid_subscribe_detail_log")
public class BidSubscribeDetailLog implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String logId;//日志Id
	private String bidSubscribeDetailId;//预约详情ID
	private String bidSubscribeId;//预约设置ID
	private Date subscribeDate;//预约日期 
	private String subscribeDateStr;
	private Date subscribeStarttime;//预约时间段开始
	private String subscribeStarttimeStr;
	private Date subscribeEndtime;//预约时间段结束
	private String subscribeEndtimeStr;
	private Integer status;//状态0停用1启用
	private String remarks;//备注
	private Date updDatetime;//更新时间
	private String updDatetimeStr;
	private String updUser;//更新人
	
	@Id
	@Column(name="log_id",length=36)
	public String getLogId() {
		return logId;
	}
	public void setLogId(String logId) {
		this.logId = logId;
	}
	
	@Column(name="bid_subscribe_detail_id",length=36)
	public String getBidSubscribeDetailId() {
		return bidSubscribeDetailId;
	}
	public void setBidSubscribeDetailId(String bidSubscribeDetailId) {
		this.bidSubscribeDetailId = bidSubscribeDetailId;
	}
	
	@Column(name="bid_subscribe_id",length=36)
	public String getBidSubscribeId() {
		return bidSubscribeId;
	}
	public void setBidSubscribeId(String bidSubscribeId) {
		this.bidSubscribeId = bidSubscribeId;
	}
	
	@Column(name="subscribe_date")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	public Date getSubscribeDate() {
		return subscribeDate;
	}
	public void setSubscribeDate(Date subscribeDate) {
		this.subscribeDate = subscribeDate;
	}
	
	@Transient
	public String getSubscribeDateStr() {
		return subscribeDateStr;
	}
	public void setSubscribeDateStr(String subscribeDateStr) {
		this.subscribeDateStr = subscribeDateStr;
	}
	
	@Column(name="subscribe_starttime")
	@DateTimeFormat(pattern="HH:mm:ss")
	public Date getSubscribeStarttime() {
		
		return subscribeStarttime;
	}
	public void setSubscribeStarttime(Date subscribeStarttime) {
		this.subscribeStarttime = subscribeStarttime;
	}
	
	@Transient
	public String getSubscribeStarttimeStr() {
		if(null != subscribeStarttime ){
			subscribeStarttimeStr = FormatDate.toTimeFormat(subscribeStarttime);
		}
		return subscribeStarttimeStr;
	}
	public void setSubscribeStarttimeStr(String subscribeStarttimeStr) {
		this.subscribeStarttimeStr = subscribeStarttimeStr;
	}
	
	@Column(name="subscribe_endtime")
	@DateTimeFormat(pattern="HH:mm:ss")
	public Date getSubscribeEndtime() {
		return subscribeEndtime;
	}
	public void setSubscribeEndtime(Date subscribeEndtime) {
		this.subscribeEndtime = subscribeEndtime;
	}
	
	@Transient
	public String getSubscribeEndtimeStr() {
		if(null != subscribeEndtime ){
			subscribeStarttimeStr = FormatDate.toTimeFormat(subscribeEndtime);
		}
		return subscribeEndtimeStr;
	}
	public void setSubscribeEndtimeStr(String subscribeEndtimeStr) {
		this.subscribeEndtimeStr = subscribeEndtimeStr;
	}
	
	
	@Column(name="status",length=4)
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	@Column(name="remarks",length=4000)
	public String getRemarks() {
		return remarks;
	}
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	
	@Column(name="upd_datetime")
	public Date getUpdDatetime() {
		return updDatetime;
	}
	public void setUpdDatetime(Date updDatetime) {
		this.updDatetime = updDatetime;
	}
	
	@Transient
	public String getUpdDatetimeStr() {
		return updDatetimeStr;
	}
	public void setUpdDatetimeStr(String updDatetimeStr) {
		this.updDatetimeStr = updDatetimeStr;
	}
	
	@Column(name="upd_user",length=36)
	public String getUpdUser() {
		return updUser;
	}
	public void setUpdUser(String updUser) {
		this.updUser = updUser;
	}
	
	
}
